home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / goodies / qtaddeffectseg / addeffectsegment.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  1.6 KB  |  67 lines

  1. //////////
  2. //
  3. //    File:        AddEffectSegment.h
  4. //
  5. //    Contains:    Sample code for adding a visual effect to a segment of a movie.
  6. //
  7. //    Written by:    Tim Monroe
  8. //
  9. //    Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //    Change History (most recent first):
  12. //
  13. //       <1>         05/05/94    rtm        first file; ole!
  14. //       
  15. //////////
  16.  
  17.  
  18. //////////
  19. //
  20. // header files
  21. //
  22. //////////
  23.  
  24. #include <Movies.h>
  25. #include <Sound.h>
  26. #include <Endian.h>
  27. #include <ImageCodec.h>
  28. #include <MediaHandlers.h>
  29.  
  30.  
  31. //////////
  32. //
  33. // compiler flags
  34. //
  35. //////////
  36.  
  37. #define USES_MAKE_IMAGE_DESC_FOR_EFFECT    0        // use MakeImageDescriptionForEffect (QT 4.0 and later)
  38. #define COPY_MOVIE_MEDIA                1        // 0 == effect source track references original media; 1 == copy media
  39.  
  40.  
  41. //////////
  42. //
  43. // constants
  44. //
  45. //////////
  46.  
  47. // effects sources names
  48. #define kSourceOneName                    FOUR_CHAR_CODE('srcA')
  49. #define kSourceTwoName                    FOUR_CHAR_CODE('srcB')
  50. #define kSourceThreeName                FOUR_CHAR_CODE('srcC')
  51. #define kSourceNoneName                    FOUR_CHAR_CODE('srcZ')
  52.  
  53.  
  54. //////////
  55. //
  56. // function prototypes
  57. //
  58. //////////
  59.  
  60.  
  61. OSErr                        QTEffSeg_AddEffectToMovieSegment (Movie theMovie, OSType theEffectType, long theNumSources, TimeValue theStartTime, TimeValue theDuration);
  62. QTAtomContainer                QTEffSeg_CreateEffectDescription (OSType theEffectName, OSType theSourceName1, OSType theSourceName2);
  63. OSErr                        QTEffSeg_AddTrackReferenceToInputMap (QTAtomContainer theInputMap, Track theTrack, Track theSrcTrack, OSType theSrcName);
  64. ImageDescriptionHandle        QTEffSeg_MakeSampleDescription (OSType theEffectType, short theWidth, short theHeight);
  65. short                        QTEffSeg_GetFrontmostTrackLayer (Movie theMovie, OSType theTrackType);
  66.  
  67.